package com.hspedu.exception_;

import java.io.FileInputStream;
import java.io.IOException;

/**
 * @Author Stringzhua
 * @Date 2024/3/7 21:00
 * description:
 */
public class Exception02 {
    public static void main(String[] args) {
//        Throwable
        try {
            FileInputStream fis;
            fis = new FileInputStream("d:\\aa.jpg");//未处理的异常:Unhandled exception: java.io.FileNotFoundException
            int len;
            while ((len = fis.read()) != -1) {
                System.out.println(len);
            }
            fis.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
